﻿using Mimi.Models.DataModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace Mimi.Converters
{
    public class CurrencyToSymbolConverter : IValueConverter
    {
        private const string c_VNDSymbol = "K";
        private const string c_USDSymbool = "$";
        private const string c_PercentageSymbol = "%";

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            Currency currencyValue = (Currency)value;

            switch (currencyValue)
            {
                case Currency.VND:
                    {
                        return c_VNDSymbol;
                    }
                case Currency.USD:
                    {
                        return c_USDSymbool;
                    }
                default:
                    return c_PercentageSymbol;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
